<template>
  <div class="item">
    <h1 class="title douyu">
      {{ item.title }}
    </h1>
    <div class="label_box">
      <div class="flex">
        <p class="label">指标值</p>
        <p class="value">
          <span>{{ item.indexVal }}</span>
        </p>
      </div>
      <div class="flex">
        <div class="label flex-col">
          <span>本年</span>
          <span>目标值</span>
        </div>
        <p class="value">
          <span>{{ item.target }}</span>
        </p>
      </div>
      <!-- <div class="flex">
        <p class="label">排名</p>
        <p class="value">{{ item.sort }}</p>
      </div> -->
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  item: {
    type: Object,
    default: () => ({}),
  },
});
console.log(`props->`, props.item);
</script>

<style lang="scss" scoped>
.item {
  width: 20%;
  // height: 50%;
  background: url("../images/core_bg.png") no-repeat;
  background-size: 100% 100%;
  padding: 25px 13px 10px;
  box-sizing: border-box;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: all 0.3s ease-in-out;
  &:hover {
    background: url("../images/core_bg_hover.png") no-repeat;
    background-size: 100% 100%;
  }
  .title {
    font-size: 16px;
    color: #ffffff;
    line-height: 20px;
    letter-spacing: 1.5px;
    text-align: left;
    padding-bottom: 15px;
    height: 60px;
    display: flex;
    align-items: center;
  }
  .label_box {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    padding-bottom: 5px;
  }
  .douyu {
    background: url("../images/icon-1.png") no-repeat;
    background-size: 19px 14px;
    background-position: 0 2px;
  }

  .flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .label {
    font-size: 14px;
    color: #fff;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
    &::before {
      content: "";
      position: absolute;
      display: inline-block;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: url("../images/icon-4.png") no-repeat;
      background-size: 19px 14px;
      left: 0;
      top: 2px;
    }
  }
  .value {
    color: rgba(48, 241, 255, 1);
    font-weight: bold;
  }
}
.flex-col {
  display: flex;
  flex-direction: column;
}
</style>
